_g_m_e_m_u_s_a_g_e is a graphical memory usage viewer. _g_m_e_m_u_s_a_g_e displays a bar
chart depicting the breakdown of memory use, with each bar labeled with
the name of the program using the memory and the number of kilobytes of
memory used. If more than one copy of a program is running, the number
of copies is displayed in parentheses after the program name.
In addition, _g_m_e_m_u_s_a_g_e will display a breakdown of the regions within a
program. Clicking on a bar or program name in the main chart will
replace the main chart with a chart for that program, with each region
labeled with one of TTTTeeeexxxxtttt, DDDDaaaattttaaaa, BBBBrrrreeeeaaaakkkk, SSSSttttaaaacccckkkk, SSSShhhhmmmmeeeemmmm, PPPPhhhhyyyyssssiiiiccccaaaallll DDDDeeeevvvviiiicccceeee, RRRRWWWW,
RRRROOOO, and (if possible) the base name of the file or device corresponding
to each region. If gmemusage is unable to determine the base name of the
file or device for a region that does correspond to a file or device,
gmemusage will display the inode number of the file or device.
The meanings of these labels are as follows:
TTTTeeeexxxxtttt This region contains executable instructions. These
instructions most likely came from an executable program file
or a dynamic shared object.
DDDDaaaattttaaaa This region contains program data. Regions marked DDDDaaaattttaaaa are
usually associated with a particular executable program file or
a dynamic shared object.
BBBBrrrreeeeaaaakkkk Data region that is grown with _b_r_k(2). This is the region that
contains memory allocated by _m_a_l_l_o_c(3C).
SSSSttttaaaacccckkkk Runtime stack. This is region is used for procedure call
frames, and can grow if the program makes deeply nested
procedure calls or calls procedures that allocate large amounts
of stack space for temporary variables.
SSSShhhhmmmmeeeemmmm A System V shared memory region.
RRRRWWWW Read/Write data without the Copy on Write bit set. This did
not come from an executable program file or a dynamic shared
object, and could be a memory mapped file.
RRRROOOO Read only data.
KKKKeeeerrrrnnnneeeellll SSSSttttaaaacccckkkk
Stack used to execute system calls in the kernel.
PPPPTTTTEEEEssss Page table entries.
Clicking on the IIIIrrrriiiixxxx bar in PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy BBBBrrrreeeeaaaakkkkddddoooowwwwnnnn mode (see below)
causes _g_m_e_m_u_s_a_g_e to display a breakdown of the memory that it is charging
to the operating system. Separate items include FFFFSSSS CCCCaaaacccchhhheeee, BBBBuuuuffffffffeeeerrrr DDDDaaaattttaaaa,
Alternatively, a list of programs to monitor can be specified on the
command line (see below). In this case, a bar for each of the programs
specified appears (as long as that program is running) and any threshold
is ignored.
In addition to the four basic viewing modes and the process region
breakdown, _g_m_e_m_u_s_a_g_e cycles through displays of additional information
when the 'v' key is pressed. This additional information is a
subdivision of each bar in the chart, with the right portion of each bar
corresponding to the additional information. Down the right side of the
window the values corresponding to the right portion of each bar are
displayed.
The following additional information is available:
PPPPrrrriiiivvvvaaaatttteeee The portion of each bar that is private memory; that is, memory
which is not being shared. This additional information is
available in all modes, except when viewing the Irix breakdown.
SSSShhhhaaaarrrreeeedddd The portion of each bar that is shared between more than one
process. This is calculated by subtracting the PPPPrrrriiiivvvvaaaatttteeee amount
from the PPPPhhhhyyyyssssiiiiccccaaaallll amount for each bar. SSSShhhhaaaarrrreeeedddd is available in
all modes, except when viewing the Irix breakdown.
PPPPhhhhyyyyssssiiiiccccaaaallll The portion of each bar that is consuming physical memory.
PPPPhhhhyyyyssssiiiiccccaaaallll is available in RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss and TTTToooottttaaaallll
Pressing the 'v' key cycles through the available additional information
for the current mode (see above discussion of additional information).
The up arrow key increases the threshold by 50 kilobytes (default) or, if
the ----dddd option was specified, by _d_e_l_t_a kilobytes. The down arrow key
decreases the threshold by the same amount. When the threshold is
decreased to 0, all programs running are displayed, even those that use
no memory (such as kernel processes).
In the main view, clicking on a program's bar causes _g_m_e_m_u_s_a_g_e to display
a detailed memory usage chart for that program. In the detailed usage
view, clicking on the shadow bar switches the program being displayed,
and clicking outside the shadow bar or pressing the space bar returns to
the main view.
In any of the detailed usage views (except RRRReeeessssiiiiddddeeeennnntttt MMMMaaaappppppppiiiinnnnggggssss), pressing
the PPPPaaaaggggeeee DDDDoooowwwwnnnn and PPPPaaaaggggeeee UUUUpppp keys navigates you through the processes that
have been combined under a single program name. For example, if you have
four _x_w_s_h processes running, this enables you to see individual memory
usage for each _x_w_s_h process.
At any time, pressing the 't' key causes _g_m_e_m_u_s_a_g_e to print statistics
about the current view to the terminal window. The fields in each line
are separated by tab characters to simplify the parsing of the output by
other programs (they are also padded with spaces). There are three
different types of print outs: AAAAllllllll PPPPrrrrooooggggrrrraaaammmmssss, RRRReeeessssiiiiddddeeeennnntttt MMMMaaaappppppppiiiinnnnggggssss, and
program breakdown. Which gets printed depends on the mode _g_m_e_m_u_s_a_g_e is
in when 't' is pressed.
The 'h' key brings up an on-line help screen, and the space bar returns
from there to viewing memory. The escape key exits.
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
gmemusage -p -t 1000 -d 100
Bring up _g_m_e_m_u_s_a_g_e in PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy BBBBrrrreeeeaaaakkkkddddoooowwwwnnnn mode, with programs using
1000 kilobytes or more of memory displayed separately in their own bars.
The up and down arrow keys will increase and decrease the threshold by
100 kilobytes respectively.
gmemusage -r xwsh toolchest 4Dwm Xsgi fm
Bring up _g_m_e_m_u_s_a_g_e in RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss mode. Display bars for
_x_w_s_h(1), _t_o_o_l_c_h_e_s_t(1), _4_D_w_m(1), _X_s_g_i(1), and _f_m(1). All other programs
will be combined into a bar labeled OOOOtttthhhheeeerrrr.
FFFFIIIILLLLEEEESSSS
$HOME/.gmemusage.inodes Table of files that are likely to correspond
to regions mapped into processes, along with
inode numbers. _g_m_e_m_u_s_a_g_e builds this table if
GGGGMMMMEEEEMMMMUUUUSSSSAAAAGGGGEEEESSSSOOOOUUUUNNNNDDDD If set, $$$$GGGGMMMMEEEEMMMMUUUUSSSSAAAAGGGGEEEESSSSOOOOUUUUNNNNDDDD is used as an aiff file to be
played by _p_l_a_y_a_i_f_f(1) when viewing a process's region
breakdown and the process grows (see above).
GGGGMMMMEEEEMMMMUUUUSSSSAAAAGGGGEEEEPPPPAAAATTTTHHHH Colon separated list of directories to recursively
search when building the inode database,
$_H_O_M_E/._g_m_e_m_u_s_a_g_e._i_n_o_d_e_s. If GGGGMMMMEEEEMMMMUUUUSSSSAAAAGGGGEEEEPPPPAAAATTTTHHHH is not found
in the environment, _g_m_e_m_u_s_a_g_e uses the following
default path:
/usr/lib:/usr/lib32:/usr/lib64:
/usr/local:/usr/sysadm:/var/ns/lib:
/lib:/lib32:/lib64:/usr/gfx
BBBBUUUUGGGGSSSS
The totals displayed for the breakdown of a program's regions do not
always add up exactly to the amount of memory in the main view. In
PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy mode, this discrepancy is due to rounding error. In
TTTToooottttaaaallll SSSSiiiizzzzeeee mode, this is often due to the inclusion of physical devices
in the breakdown. The RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeee discrepancies are currently being